home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD005b.dsk
/
MATH.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
4KB
|
133 lines
0 ONERR GOTO 850
10 REM MATH
20 REM BY IAN PILCHER
30 REM 2/2/82
40 GOTO 850
50 REM **MULTIPLICATION**
60 T1 = INT( RND(1) *11)
70 T2 = INT( RND(1) *11)
80 PRINT T1;" * ";T2;" = ";
81 INPUT A
90 IF A = T1 *T2 THEN P = 1: GOTO 130
100 PRINT : PRINT "WOOPS! NOT TOO GOOD, BETTER TRY AGAIN."
110 PRINT T1;" * ";T2;" = ";
111 INPUT A
120 P = .5
125 IF A < >T1 *T2 THEN P = 0
130 PM = PM +1
140 XM = XM +P
150 REM PM IS POSSIBLE FOR MULTIPLICATION
160 REM XM IS POINTS FOR MULTIPLICATION
170 IF P = 0 THEN PRINT "BOTH ANSWERS YOU ENTERED WERE WRONG!": GOTO 190
180 PRINT "YOUR ANSWER WAS RIGHT ON TRY #";1/P;"!"
190 RETURN
200 REM **DIVISION**
210 T2 = INT( RND(1) *10) +1
220 A = INT( RND(1) *11)
230 T1 = T2 *A
235 A = 0
240 PRINT T1;" / ";T2;" = ";
241 INPUT A
250 IF A = T1/T2 THEN P = 1: GOTO 290
255 PRINT "NOPE, THAT'S NOT RIGHT. TRY AGAIN."
260 PRINT T1;" / ";T2;" = ";
270 INPUT A
280 IF A = T1/T2 THEN P = .5
290 PD = PD +1
300 XD = XD +P
310 IF P = 0 THEN PRINT "BOTH OF THOSE RESPONSES WERE WRONG!": GOTO 330
320 PRINT "YOU WERE RIGHT ON TRY #";1/P;"!"
330 RETURN
340 REM **SUBTRTACTION**
350 T1 = INT( RND(1) *10) +1
360 T2 = INT( RND(1) *(T1 +1))
370 IF T1 <T2 THEN 350
380 PRINT T1;" - ";T2;" = ";
390 INPUT A
400 IF A = T1 -T2 THEN P = 1: GOTO 450
410 PRINT "COME ON NOW, WHAT IS ";
420 PRINT T1;" - ";T2;" = ";
430 INPUT A
440 IF A = T1 -T2 THEN P = .5
450 PS = PS +1
460 XS = XS +P
470 IF P = 0 THEN PRINT "BOTH OF THEM WERE WRONG, YOU NEED MORE PRACTICE.": GOTO 490
480 PRINT "YOUR ANSWER WAS CORRECT ON TRY #";1/P;"!"
490 RETURN
500 REM **ADDITION**
510 T1 = INT( RND(1) *11)
520 T2 = INT( RND(1) *11)
530 PRINT T1;" + ";T2;" = ";
540 INPUT A
550 IF A = T1 +T2 THEN P = 1: GOTO 600
560 PRINT "THAT'S NOT RIGHT. NOW TRY AGAIN."
570 PRINT T1;" + ";T2;" = ";
580 INPUT A
590 IF A = T1 +T2 THEN P = .5
600 PA = PA +1
610 XA = XA +P
620 IF P = 0 THEN PRINT "THAT WASN'T TOO GOOD, YOU NEED SOME MOREPRACTICE.": GOTO 640
630 PRINT "RESPONSE #";1/P;" WAS CORRECT."
640 RETURN
650 INPUT "OUTPUT TO PRINTER ALSO (Y/N)? ";Q$
651 IF LEFT$(Q$,1) = "Y" THEN PR# 1
652 HOME
660 PRINT "SUBJ."; TAB( 10);"POSSIBLE"; TAB( 20);"SCORE"; TAB( 30);"PERCENTAGE"
670 PRINT "----------------------------------------"
680 PRINT
685 IF PA = 0 THEN PRINT "ADD.";: HTAB 10: INVERSE : PRINT "NONE": NORMAL : GOTO 700
690 PRINT "ADD."; TAB( 10);PA; TAB( 20);XA; TAB( 30);(XA/PA) *100;"%"
700 PRINT : PRINT : PRINT
710 IF PS = 0 THEN PRINT "SUB.";: HTAB 10: INVERSE : PRINT "NONE": NORMAL : GOTO 730
720 PRINT "SUB."; TAB( 10);PS; TAB( 20);XS; TAB( 30);(XS/PS) *100;"%"
730 PRINT : PRINT : PRINT
740 IF PM = 0 THEN PRINT "MULT.";: HTAB 10: INVERSE : PRINT "NONE": NORMAL : GOTO 760
750 PRINT "MULT."; TAB( 10);PM; TAB( 20);XM; TAB( 30);(XM/PM) *100;"%"
760 PRINT : PRINT : PRINT
770 IF PD = 0 THEN PRINT "DIV.";: HTAB 10: INVERSE : PRINT "NONE": NORMAL : GOTO 790
780 PRINT "DIV."; TAB( 10);PD; TAB( 20);XD; TAB( 30);(XD/PD) *100;"%"
790 PRINT : PRINT : PRINT
800 PT = PA +PS +PM +PD
810 XT = XA +XS +XM +XD
820 IF PT = 0 THEN PRINT "TOTAL";: HTAB 10: INVERSE : PRINT "NONE": NORMAL : GOTO 840
830 PRINT "TOTAL"; TAB( 10);PT; TAB( 20);XT; TAB( 30);(XT/PT) *100;"%"
831 PR# 0
840 RETURN
850 TEXT : HOME : NORMAL : SPEED= 255
851 HTAB 18
852 INVERSE
853 PRINT "MENU"
854 NORMAL
855 VTAB 20
856 HTAB 1
857 PRINT "NOTE: GETTING THE PROBLEM RIGHT THE SECOND TIME EARNS HALF CREDIT."
860 VTAB 5
870 PRINT TAB( 5);"1) ADDITION"
880 PRINT TAB( 5);"2) SUBTRACTION"
890 PRINT TAB( 5);"3) MULTIPLICATION"
900 PRINT TAB( 5);"4) DIVISION"
910 PRINT
920 PRINT TAB( 5);"5) CURRENT SCORE"
921 PRINT TAB( 5)"6) RESTART PROGRAM"
922 PRINT
923 PRINT TAB( 5)"7) QUIT"
930 PRINT : PRINT : PRINT
940 PRINT "PLEASE PRESS THE NUMBER CORRESPONDING TOYOUR CHOICE. ";
950 GET O$
960 O = VAL(O$)
970 IF O = 0 THEN 850
975 IF O >7 THEN 850
976 T1 = 0:T2 = 0:A = 0:P = 0
977 HOME
980 ON O GOSUB 500,340,50,200,650,1090,1080
990 VTAB 23
1000 HTAB 1
1010 INVERSE
1020 PRINT "PRESS ANY KEY TO CONTINUE"
1030 NORMAL
1040 K = PEEK( -16384)
1050 IF K < = 127 THEN 1040
1060 POKE -16368,0
1070 GOTO 850
1080 END
1090 RUN